﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace PkwHCFramework.UserControls
{
    /// <summary>
    /// DataPointUC.xaml 的交互逻辑
    /// </summary>
    public partial class DataPointUC : UserControl
    {
        /// <summary>
        /// 是否需要控制
        /// </summary>
        public bool IsControl
        {
            get { return (bool)GetValue(IsControlProperty); }
            set { SetValue(IsControlProperty, value); }
        }

        // Using a DependencyProperty as the backing store for IsControl.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty IsControlProperty = DependencyProperty.Register(
            "IsControl",
            typeof(bool),
            typeof(DataPointUC),
            new PropertyMetadata(false)
        );

        public ICommand SetValueCommand
        {
            get { return (ICommand)GetValue(SetValueCommandProperty); }
            set { SetValue(SetValueCommandProperty, value); }
        }

        // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SetValueCommandProperty =
            DependencyProperty.Register(
                "SetValueCommand",
                typeof(ICommand),
                typeof(DataPointUC),
                new PropertyMetadata(null)
            );

        public DataPointUC()
        {
            InitializeComponent();
        }
    }
}
